Node property typing #37
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A node's
defaultsobject in its HTML definition provides a list of its properties with some metadata associated with them.If a property is intended to be a reference to a configuration node, its entry in the defaults object will include the
typeproperty that identifies the type of config node it should point to.This allows the editor to automatically generate the Config Node select box UI and manage the relationship between the nodes.
This design note explores extending this property to allow for a richer set of relationships between nodes.
It does not (currently) talk about specifying types of node properties more generally - this is only where there is a node property that holds the id (or multiple ids) of other nodes. The editor needs this information when importing/exporting nodes to ensure the references are preserved if ids are changed.
This is a very initial design note just to get these ideas out of my head and somewhere we can discuss them. There is more work to be done around what (if any) UI improvements this could lead to around Config node selection in a node's edit dialog.